/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proyectoconcesionario;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author AULAC
 */
public class AccesoDatos {
    
    public Connection getConnection() {
        
        Connection con = null;
        
        try {
            
            con = DriverManager.getConnection("jdbc:mysql://localhost:3306/concesionario", "root", "");
            
        } catch (SQLException ex) {
            
            JOptionPane.showMessageDialog(null, ex.getMessage());
            
        } finally {
            
            return con;
            
        }
        
    }
    
}
